package com.w.tank;

import java.awt.*;

public class Wall extends GameObject{


    int w,h;
    Rectangle rect ;
    GameControl gc = GameControl.getInstance();
    public Wall(int w, int h, int x, int y){
        this.w = w;
        this.h = h;
        this.x = x;
        this.y = y;
        rect = new Rectangle(x,y,w,h);
        gc.add(this);
    }
    @Override
    public int getWidth() {
        return w;
    }

    @Override
    public int getHeight() {
        return h;
    }

    @Override
    public void paint(Graphics g) {
        Color c = g.getColor();
        g.setColor(Color.GRAY);
        g.drawRect(x, y, w, h);



    }
}
